﻿using ChiWalker.Dynamics;
using ChiWalker.Helpers;
using ChiWalker.Spell;
using ChiWalker.Utilities;
using Styx;
using Styx.TreeSharp;

namespace ChiWalker.Routines.Paladin
{
    internal class Lowbie

    {
        [Behavior(BehaviorType.Pull | BehaviorType.Combat)]
        [Spec(WoWSpec.None)]
        [Class(WoWClass.Paladin)]
        public static Composite LowbiePaladin()
        {
            return
                new PrioritySelector(
                    Safers.EnsureTarget(),
                    WaitFor.WaitForCast(),
                    Movement.MoveToLoS(ret => StyxWoW.Me.CurrentTarget),
                    Movement.FaceMyTarget(),
                    new CastOnSelf(Spell.WordofGlory,
                        ret => StyxWoW.Me.CurrentHolyPower >= 2 && StyxWoW.Me.HealthPercent <= 85),
                    new CastOnMyTarget(Spell.Judgment),
                    new CastOnMyTarget(Spell.CrusaderStrike),
                    Movement.MoveToUnit(ret => StyxWoW.Me.CurrentTarget)
                    );
        }
    }
}